<script type="text/javascript">                    
    $(document).ready(function() {
        $("#datepicker").datepicker({dateFormat: 'yy-mm-dd'});
        $("#datepicker2").datepicker({dateFormat: 'yy-mm-dd'});
      });                 
</script>
<div class="box">
     <!-- box / title -->
        <div class="title">
                <h5>User > User Keyword</h5>
                
        </div>
        <form id="form" action="<?=$_SERVER['PHP_SELF']?>" method="post">
                <div class="form">
                        <div class="fields">
                                
                                <div class="field">
                                        <div class="label">
                                                <label for="tanggal">Valid Date (YYYY-MM-DD):</label>
                                        </div>
                                        <div class="input">
                                               <input type="text" id="datepicker" name="tanggal" value="<?= $this->input->post("tanggal") ? $this->input->post("tanggal") : date('Y-m-d') ?>" size="30" />
                                        </div>
                                </div>
                            <div class="buttons">
                                        <input type="submit" name="view" value="View" />                                        
                            
                                        <input type="submit" name="submit" value="Generate" /> 
                                        <?php
                                        if($hasil <> "") {
                                            echo "$hasil berhasil di generate";
                                        }
                                        ?>
                            </div>
                            <div class="buttons">
                                        <input type="submit" name="delete" value="Delete" /> 
                                        <?php
                                        if($hasil2 <> "") {
                                            echo "$hasil2 berhasil di generate";
                                        }
                                        ?>
                            </div>
                        </div>
                </div>
        </form>
     
     <div class="table">
                <base href="<?php echo base_url() ?>" />
                <div id="ajaxLoadAni">
                        <img src="file/smooth/images/ajax-loader.gif" alt="Ajax Loading Animation" />
                        <span>Loading...</span>
                </div>
                <table id="records">
                        <thead>
                                <tr>                                        
                                        <th>User ID</th>
					<th>Valid Date</th>
					<th>Keyword</th>
					<th>Client</th>	                                       
                                </tr>
                        </thead>
                        <tbody></tbody>
                </table>
                <?=$this->load->view("grid-keyword");?>
        </div>
</div>